/**   
* @Title: RequestLimit.java
* @Package org.xaoyaoyao.cloud.web.limit
* @Description: TODO
* @author xaoyaoyao
* @date Feb 11, 2019 2:36:02 PM
* @version V1.0   
*/
package org.xaoyaoyao.cloud.web.limit;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
* @ClassName: RequestLimit
* @Description: TODO
* @author xaoyaoyao
* @date Feb 11, 2019 2:36:02 PM
* 
*/

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
@Order(Ordered.HIGHEST_PRECEDENCE)
public @interface RequestLimit {
	
	/**
	 * @Title: name
	 * @Description: 拦截名称
	 * @Reutrn String
	 */
	String name() default "all";

	/**
	 * @Title: time
	 * @Description: 时间段，单位为毫秒，默认值一分钟
	 * @Reutrn int
	 */
	int time() default 60;

	/**
	 * @Title: limit
	 * @Description: 允许访问的次数，默认值MAX_VALUE
	 * @Reutrn int
	 */
	int limit() default Integer.MAX_VALUE;

}
